package com.cskaoyan.bean.po.goods;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import net.sf.json.JSONArray;

import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

/**
 * @Author: 冯子靖
 * @Description:
 * @Date: 2022/7/20 9:54
 */
@Data
@TableName("market_goods_product")
public class AdminGoodsProductsUpdatePO {
    private Integer id;

    private String specifications;

    private BigDecimal price;

    private Integer number;

    private String url;

    private Integer goodsId;
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date addTime;
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    private boolean deleted;

    public void setSpecifications(List<String> specifications) {
        this.specifications = JSONArray.fromObject(specifications).toString();
    }

}
